﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Combat/Combat.master" AutoEventWireup="true"
    CodeFile="SodiersNew.aspx.cs" Inherits="MapInfo_ProfessionalTeam_SodiersNew"
    StylesheetTheme="Content" %>

<%@ Register Src="../../UserContral/ListPageContral.ascx" TagName="ListPageContral"
    TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script type="text/javascript">
        function print() {
            window.open('Print.aspx');

        }
        function CheckAll(oCheckbox) {
            var items = document.getElementsByTagName("INPUT");
            for (i = 0; i < items.length; i++) {
                if (items[i].type == "checkbox") {
                    items[i].checked = oCheckbox.checked;
                }
            }
        }
        function OpenWin(url) {
            var h = 480;
            var w = 640;
            var t = (screen.height - h) / 2;
            var l = (screen.width - w) / 2;
            window.open(url, null, 'left=' + l + ",top=" + t + ",width=" + w + ",height=" + h + ",toolbar=yes,scrollbars=yes,status=yes");
        }
    </script>

    <ul class="topmenu">
        <li>
            <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">保存</asp:LinkButton>
        </li>
        <li>
           <asp:LinkButton ID="lbtReturn" runat="server" onclick="lbtReturn_Click">返回</asp:LinkButton>
        </li>
    </ul>
    <asp:GridView ID="gvSoldiers" runat="server" AutoGenerateColumns="False" Caption="<span>人员列表</span>"
        DataKeyNames="SoldierID,DepartmentID" Width="98%" OnRowDataBound="gvSoldiers_RowDataBound">
        <Columns>
            <asp:TemplateField>
                <HeaderTemplate>
                    <input id="ChkAll" type="checkbox" onclick="CheckAll(this)" runat="server" title="全选/取消" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID="CheckItem" runat="server" />
                    <asp:Label runat="server" ID="lblID" Text='<%# Eval("SoldierID") %>' Visible="false"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField ItemStyle-HorizontalAlign="Left">
                <HeaderStyle Width="30px" HorizontalAlign="Center" />
                <ItemStyle HorizontalAlign="Center" />
                <ItemTemplate>
                    <asp:Label ID="ID" runat="server" ForeColor="#666666"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="CardID" HeaderText="编号" />
            <asp:TemplateField HeaderText="姓名">
                <ItemTemplate>
                    <a runat="server" target="_blank" id="AName">
                        <%# Eval("SoldierName")%></a>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Birthday" HeaderText="出生年月" HtmlEncode="false" DataFormatString="{0:yyyy-MM-dd}" />
            <asp:BoundField DataField="DutyName" HeaderText="职务" />
            <asp:BoundField DataField="RankName" HeaderText="衔级" />
            <asp:TemplateField HeaderText="文化程度">
                <ItemTemplate>
                    <%#Eval("CultureName") %>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <RowStyle HorizontalAlign="Left" />
        <HeaderStyle HorizontalAlign="Left" />
    </asp:GridView>
    <uc1:ListPageContral ID="ListPageContral1" PageSize="20" runat="server" OnPageSizeChange="ListPageContral1_PageSizeChange" />
</asp:Content>
